const express=require('express')
const config=require('../config')
const path=require('path')

let app=express()

app.set('views',path.join(__dirname, 'views'));
app.set('view engine','ejs');

app.use(express.static('src/static'));
app.use(require('cookie-parser')())
app.use(require('body-parser')())

app.use('/',require('./controller/home'))
app.use('/note',require('./controller/note'))
app.use('/user',require('./controller/user'))

app.listen(config.server.port,config.server.host,() => {
    console.log(`The application is running on ${config.server.host}:${config.server.port}`)
})